package br.gerenciadorAudio.Repository;

import br.gerenciadorAudio.Model.ProfileSchedule;
import android.content.ContentValues;

public class RepositoryProfileScheduleScript  {

	public static String CreateTable()
	{
		String sql = "";
		
		sql = "create table if not exists tbPerfilAgendamento " +
				"(pk_int_perfilAgendamento integer primary key autoincrement" +
				",fk_int_perfil int not null" +
				",bit_segunda bit not null" +
				",bit_terca bit not null" +
				",bit_quarta bit not null" +
				",bit_quinta bit not null" +
				",bit_sexta bit not null" +
				",bit_sabado bit not null" +
				",bit_domingo bit not null" +
				",dt_inicio varchar(30) not null" +
				",dt_fim varchar(30) not null" +
				",bit_ativo bit not null)";
		
		return sql;
	}
	
	public static ContentValues Insert(ProfileSchedule profileSchedule)
	{
		ContentValues values = new ContentValues();
		values.put(ProfileSchedule.Colunas.IdPerfil, profileSchedule.IdPerfil);
		values.put(ProfileSchedule.Colunas.Monday, profileSchedule.Monday);
		values.put(ProfileSchedule.Colunas.Tuesday, profileSchedule.Tuesday);
		values.put(ProfileSchedule.Colunas.Wednesday, profileSchedule.Wednesday);
		values.put(ProfileSchedule.Colunas.Thursday, profileSchedule.Thursday);
		values.put(ProfileSchedule.Colunas.Friday, profileSchedule.Friday);
		values.put(ProfileSchedule.Colunas.Saturday, profileSchedule.Saturday);
		values.put(ProfileSchedule.Colunas.Sunday, profileSchedule.Sunday);
		values.put(ProfileSchedule.Colunas.DateOfBegin, profileSchedule.DateOfBegin.toString());
		values.put(ProfileSchedule.Colunas.DateOfEnd, profileSchedule.DateOfEnd.toString());
		values.put(ProfileSchedule.Colunas.Active, profileSchedule.Active);

		return values;
	}
	
	public static ContentValues Update(ProfileSchedule profileSchedule)
	{
		ContentValues values = new ContentValues();
		values.put(ProfileSchedule.Colunas.Id, profileSchedule.Id);
		values.put(ProfileSchedule.Colunas.IdPerfil, profileSchedule.IdPerfil);
		values.put(ProfileSchedule.Colunas.Monday, profileSchedule.Monday);
		values.put(ProfileSchedule.Colunas.Tuesday, profileSchedule.Tuesday);
		values.put(ProfileSchedule.Colunas.Wednesday, profileSchedule.Wednesday);
		values.put(ProfileSchedule.Colunas.Thursday, profileSchedule.Thursday);
		values.put(ProfileSchedule.Colunas.Friday, profileSchedule.Friday);
		values.put(ProfileSchedule.Colunas.Saturday, profileSchedule.Saturday);
		values.put(ProfileSchedule.Colunas.Sunday, profileSchedule.Sunday);
		values.put(ProfileSchedule.Colunas.DateOfBegin, profileSchedule.DateOfBegin);
		values.put(ProfileSchedule.Colunas.DateOfEnd, profileSchedule.DateOfEnd);
		values.put(ProfileSchedule.Colunas.Active, profileSchedule.Active);
		
		return values;	
	}
	/*
	public static ContentValues UpdateProfileSetActive(boolean active)
	{
		ContentValues values = new ContentValues();
		values.put(Profile.Colunas.Ativo, active);
		
		return values;
	}
	
	public static ContentValues ApagarTbPerfilPorId(Profile profile)
	{
		ContentValues values = new ContentValues();
		values.put(Profile.Colunas.Id, profile.Id);
		values.put(Profile.Colunas.Alarme, profile.Alarme);
		values.put(Profile.Colunas.Multimidia, profile.Multimedia);
		values.put(Profile.Colunas.Nome, profile.Name);
		values.put(Profile.Colunas.Notificacao, profile.Notification);
		values.put(Profile.Colunas.Ringtong, profile.Ringtong);
		values.put(Profile.Colunas.Silencioso, profile.Silent);
		values.put(Profile.Colunas.Vibracall, profile.Vibrate);
		values.put(Profile.Colunas.Ativo, profile.Active);
		
		return values;
	}
	*/
}